home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 22 / CU Amiga Magazine's Super CD-ROM 22 (1998)(EMAP Images)(GB)[!][issue 1998-05].iso / PowerPC / Programming / PPCSmallEiffel / bin_c / pretty7.c < prev    next >
Encoding:
C/C++ Source or Header  |  1998-01-16  |  16.2 KB  |  580 lines

  1. /*
  2. -- ANSI C code generated by :
  3. -- SmallEiffel The GNU Eiffel Compiler -- Release (- 0.82)      --
  4. -- Copyright (C), 1994-98 - LORIA - UHP - CRIN - INRIA - FRANCE --
  5. -- Dominique COLNET and Suzanne COLLIN -    colnet@loria.fr     --
  6. --                 http://www.loria.fr/SmallEiffel              --
  7. */
  8. #include "pretty.h"
  9. /*No:ARRAY[E_REQUIRE].clear_all*/
  10. /*No:ARRAY[E_REQUIRE].set_all_with*/
  11. int r522empty(T522* C){
  12. int R=0;
  13. R=(r522count(C))==(0);
  14. return R;
  15. }
  16. void r522make(T522* C,int a1,int a2){
  17. int _needed=0;
  18. C->_lower=a1;
  19. C->_upper=a2;
  20. _needed=((a2)-(a1))+(1);
  21. /*IF*/if ((_needed)>(0)) {
  22. /*IF*/if (((((T522*)C))->_capacity/*4*/)<(_needed)) {
  23. /*IF*/if (((((T522*)C))->_capacity/*4*/)==(0)) {
  24. C->_storage=calloc(_needed,sizeof(T0*));
  25. }
  26. else {
  27. C->_storage=calloc(_needed,sizeof(T0*));
  28. }
  29. /*FI*/C->_capacity=_needed;
  30. }
  31. else {
  32. /*[IRF3.6clear_all*/{T522* C1=C;
  33. T0* __value=NULL;
  34. /*[IRF3.6set_all_with*/{T522* C2=C1;
  35. T0* c1=__value;
  36. r884set_all_with((((T522*)C2))->_storage/*0*/,c1,((((T522*)C2))->_upper/*8*/)-((((T522*)C2))->_lower/*12*/));
  37. }/*]*/
  38. }/*]*/
  39. }
  40. /*FI*/}
  41. /*FI*/}
  42. int r522fast_has(T522* C,T0* a1){
  43. int R=0;
  44. /*IF*/if ((r522count(C))>(0)) {
  45. R=(r522fast_index_of(C,a1))<=((((T522*)C))->_upper/*8*/);
  46. }
  47. /*FI*/return R;
  48. }
  49. T0* r522item(T522* C,int a1){
  50. T0* R=NULL;
  51. R=((((T522*)C))->_storage/*0*/)[(a1)-((((T522*)C))->_lower/*12*/)];
  52. return R;
  53. }
  54. void r522clear(T522* C){
  55. C->_upper=((((T522*)C))->_lower/*12*/)-(1);
  56. }
  57. /*No:ARRAY[E_REQUIRE].storage*/
  58. /*No:ARRAY[E_REQUIRE].capacity*/
  59. /*No:ARRAY[E_REQUIRE].lower*/
  60. int r522fast_index_of(T522* C,T0* a1){
  61. int R=0;
  62. R=((((T522*)C))->_lower/*12*/)+(r884fast_index_of((((T522*)C))->_storage/*0*/,a1,((((T522*)C))->_upper/*8*/)-((((T522*)C))->_lower/*12*/)));
  63. return R;
  64. }
  65. /*No:ARRAY[E_REQUIRE].put*/
  66. /*No:ARRAY[E_REQUIRE].upper*/
  67. void r522add_last(T522* C,T0* a1){
  68. int _new_capacity=0;
  69. /*IF*/if (((((T522*)C))->_capacity/*4*/)<((r522count(C))+(1))) {
  70. /*IF*/if (((((T522*)C))->_capacity/*4*/)==(0)) {
  71. C->_capacity=16;
  72. C->_storage=calloc((((T522*)C))->_capacity/*4*/,sizeof(T0*));
  73. }
  74. else {
  75. _new_capacity=(2)*((((T522*)C))->_capacity/*4*/);
  76. C->_storage=r884realloc((((T522*)C))->_storage/*0*/,(((T522*)C))->_capacity/*4*/,_new_capacity);
  77. C->_capacity=_new_capacity;
  78. }
  79. /*FI*/}
  80. /*FI*/C->_upper=((((T522*)C))->_upper/*8*/)+(1);
  81. /*[IRF3.6put*/{T522* C1=C;
  82. T0* b1=a1;
  83. int b2=(((T522*)C))->_upper/*8*/;
  84. ((((T522*)C1))->_storage/*0*/)[(b2)-((((T522*)C1))->_lower/*12*/)]=(b1);
  85. }/*]*/
  86. }
  87. int r522count(T522* C){
  88. int R=0;
  89. R=(((((T522*)C))->_upper/*8*/)-((((T522*)C))->_lower/*12*/))+(1);
  90. return R;
  91. }
  92. T0* r552item(T552* C,int a1){
  93. T0* R=NULL;
  94. R=((((T552*)C))->_storage/*0*/)[(a1)-((((T552*)C))->_lower/*12*/)];
  95. return R;
  96. }
  97. /*No:ARRAY[RENAME_PAIR].storage*/
  98. /*No:ARRAY[RENAME_PAIR].capacity*/
  99. /*No:ARRAY[RENAME_PAIR].lower*/
  100. /*No:ARRAY[RENAME_PAIR].put*/
  101. /*No:ARRAY[RENAME_PAIR].upper*/
  102. int r552count(T552* C){
  103. int R=0;
  104. R=(((((T552*)C))->_upper/*8*/)-((((T552*)C))->_lower/*12*/))+(1);
  105. return R;
  106. }
  107. void r552add_last(T552* C,T0* a1){
  108. int _new_capacity=0;
  109. /*IF*/if (((((T552*)C))->_capacity/*4*/)<((r552count(C))+(1))) {
  110. /*IF*/if (((((T552*)C))->_capacity/*4*/)==(0)) {
  111. C->_capacity=16;
  112. C->_storage=calloc((((T552*)C))->_capacity/*4*/,sizeof(T0*));
  113. }
  114. else {
  115. _new_capacity=(2)*((((T552*)C))->_capacity/*4*/);
  116. C->_storage=r949realloc((((T552*)C))->_storage/*0*/,(((T552*)C))->_capacity/*4*/,_new_capacity);
  117. C->_capacity=_new_capacity;
  118. }
  119. /*FI*/}
  120. /*FI*/C->_upper=((((T552*)C))->_upper/*8*/)+(1);
  121. /*[IRF3.6put*/{T552* C1=C;
  122. T0* b1=a1;
  123. int b2=(((T552*)C))->_upper/*8*/;
  124. ((((T552*)C1))->_storage/*0*/)[(b2)-((((T552*)C1))->_lower/*12*/)]=(b1);
  125. }/*]*/
  126. }
  127. /*No:FIXED_ARRAY[E_FEATURE].item*/
  128. /*No:FIXED_ARRAY[E_FEATURE].clear*/
  129. /*No:FIXED_ARRAY[E_FEATURE].storage*/
  130. T0* r352twin(T352* C){
  131. T0* R=NULL;
  132. R=malloc(sizeof(*C));
  133. *((T352*)R)=M352;
  134. r352copy(((T352*)R),((T0*)C));
  135. return R;
  136. }
  137. /*No:FIXED_ARRAY[E_FEATURE].capacity*/
  138. void r352copy(T352* C,T0* a1){
  139. int _new_capacity=0;
  140. int _other_upper=0;
  141. _other_upper=(((T352*)((T352*)a1)))->_upper/*8*/;
  142. /*IF*/if ((_other_upper)>=(0)) {
  143. _new_capacity=(_other_upper)+(1);
  144. /*IF*/if (((((T352*)C))->_capacity/*4*/)<(_new_capacity)) {
  145. C->_capacity=_new_capacity;
  146. C->_storage=calloc(_new_capacity,sizeof(T0*));
  147. }
  148.  else if (((((T352*)C))->_capacity/*4*/)>(0)) {
  149. r822clear_all((((T352*)C))->_storage/*0*/,((((T352*)C))->_capacity/*4*/)-(1));
  150. }
  151. /*FI*/r822copy_from((((T352*)C))->_storage/*0*/,(((T352*)((T352*)a1)))->_storage/*0*/,_other_upper);
  152. }
  153.  else if (((((T352*)C))->_capacity/*4*/)>(0)) {
  154. r822clear_all((((T352*)C))->_storage/*0*/,((((T352*)C))->_capacity/*4*/)-(1));
  155. }
  156. /*FI*/C->_upper=_other_upper;
  157. }
  158. void r352with_capacity(T352* C,int a1){
  159. /*IF*/if (((((T352*)C))->_capacity/*4*/)<(a1)) {
  160. C->_storage=calloc(a1,sizeof(T0*));
  161. C->_capacity=a1;
  162. }
  163. /*FI*/C->_upper=-(1);
  164. }
  165. /*No:FIXED_ARRAY[E_FEATURE].put*/
  166. /*No:FIXED_ARRAY[E_FEATURE].upper*/
  167. void r352add_last(T352* C,T0* a1){
  168. int _new_capacity=0;
  169. /*IF*/if ((((((T352*)C))->_upper/*8*/)+(1))<=(((((T352*)C))->_capacity/*4*/)-(1))) {
  170. C->_upper=((((T352*)C))->_upper/*8*/)+(1);
  171. }
  172.  else if (((((T352*)C))->_capacity/*4*/)==(0)) {
  173. C->_storage=calloc(2,sizeof(T0*));
  174. C->_capacity=2;
  175. C->_upper=0;
  176. }
  177. else {
  178. _new_capacity=(2)*((((T352*)C))->_capacity/*4*/);
  179. C->_storage=r822realloc((((T352*)C))->_storage/*0*/,(((T352*)C))->_capacity/*4*/,_new_capacity);
  180. C->_capacity=_new_capacity;
  181. C->_upper=((((T352*)C))->_upper/*8*/)+(1);
  182. }
  183. /*FI*//*[IRF3.5put*/((((T352*)C))->_storage/*0*/)[(((T352*)C))->_upper/*8*/]=(a1);
  184. /*]*/
  185. }
  186. T0* r848item(T848* C,int a1){
  187. T0* R=NULL;
  188. R=((((T848*)C))->_storage/*0*/)[(a1)-((((T848*)C))->_lower/*12*/)];
  189. return R;
  190. }
  191. /*No:ARRAY[INDEX_CLAUSE].storage*/
  192. /*No:ARRAY[INDEX_CLAUSE].capacity*/
  193. /*No:ARRAY[INDEX_CLAUSE].lower*/
  194. /*No:ARRAY[INDEX_CLAUSE].put*/
  195. /*No:ARRAY[INDEX_CLAUSE].upper*/
  196. int r848count(T848* C){
  197. int R=0;
  198. R=(((((T848*)C))->_upper/*8*/)-((((T848*)C))->_lower/*12*/))+(1);
  199. return R;
  200. }
  201. void r848add_last(T848* C,T0* a1){
  202. int _new_capacity=0;
  203. /*IF*/if (((((T848*)C))->_capacity/*4*/)<((r848count(C))+(1))) {
  204. /*IF*/if (((((T848*)C))->_capacity/*4*/)==(0)) {
  205. C->_capacity=16;
  206. C->_storage=calloc((((T848*)C))->_capacity/*4*/,sizeof(T0*));
  207. }
  208. else {
  209. _new_capacity=(2)*((((T848*)C))->_capacity/*4*/);
  210. C->_storage=r100realloc((((T848*)C))->_storage/*0*/,(((T848*)C))->_capacity/*4*/,_new_capacity);
  211. C->_capacity=_new_capacity;
  212. }
  213. /*FI*/}
  214. /*FI*/C->_upper=((((T848*)C))->_upper/*8*/)+(1);
  215. /*[IRF3.6put*/{T848* C1=C;
  216. T0* b1=a1;
  217. int b2=(((T848*)C))->_upper/*8*/;
  218. ((((T848*)C1))->_storage/*0*/)[(b2)-((((T848*)C1))->_lower/*12*/)]=(b1);
  219. }/*]*/
  220. }
  221. T0* r38item(T38* C,int a1){
  222. T0* R=NULL;
  223. R=((((T38*)C))->_storage/*0*/)[(a1)-((((T38*)C))->_lower/*12*/)];
  224. return R;
  225. }
  226. void r38clear(T38* C){
  227. C->_upper=((((T38*)C))->_lower/*12*/)-(1);
  228. }
  229. /*No:ARRAY[POSITION].storage*/
  230. /*No:ARRAY[POSITION].capacity*/
  231. int r38has(T38* C,T0* a1){
  232. int R=0;
  233. /*IF*/if ((r38count(C))>(0)) {
  234. R=(r38index_of(C,a1))<=((((T38*)C))->_upper/*8*/);
  235. }
  236. /*FI*/return R;
  237. }
  238. /*No:ARRAY[POSITION].lower*/
  239. void r38with_capacity(T38* C,int a1,int a2){
  240. /*IF*/if (((((T38*)C))->_capacity/*4*/)<(a1)) {
  241. C->_storage=calloc(a1,sizeof(T0*));
  242. C->_capacity=a1;
  243. }
  244. /*FI*/C->_lower=a2;
  245. C->_upper=(a2)-(1);
  246. }
  247. /*No:ARRAY[POSITION].put*/
  248. /*No:ARRAY[POSITION].upper*/
  249. void r38add_last(T38* C,T0* a1){
  250. int _new_capacity=0;
  251. /*IF*/if (((((T38*)C))->_capacity/*4*/)<((r38count(C))+(1))) {
  252. /*IF*/if (((((T38*)C))->_capacity/*4*/)==(0)) {
  253. C->_capacity=16;
  254. C->_storage=calloc((((T38*)C))->_capacity/*4*/,sizeof(T0*));
  255. }
  256. else {
  257. _new_capacity=(2)*((((T38*)C))->_capacity/*4*/);
  258. C->_storage=r379realloc((((T38*)C))->_storage/*0*/,(((T38*)C))->_capacity/*4*/,_new_capacity);
  259. C->_capacity=_new_capacity;
  260. }
  261. /*FI*/}
  262. /*FI*/C->_upper=((((T38*)C))->_upper/*8*/)+(1);
  263. /*[IRF3.6put*/{T38* C1=C;
  264. T0* b1=a1;
  265. int b2=(((T38*)C))->_upper/*8*/;
  266. ((((T38*)C1))->_storage/*0*/)[(b2)-((((T38*)C1))->_lower/*12*/)]=(b1);
  267. }/*]*/
  268. }
  269. int r38count(T38* C){
  270. int R=0;
  271. R=(((((T38*)C))->_upper/*8*/)-((((T38*)C))->_lower/*12*/))+(1);
  272. return R;
  273. }
  274. int r38index_of(T38* C,T0* a1){
  275. int R=0;
  276. R=((((T38*)C))->_lower/*12*/)+(r379index_of((((T38*)C))->_storage/*0*/,a1,((((T38*)C))->_upper/*8*/)-((((T38*)C))->_lower/*12*/)));
  277. return R;
  278. }
  279. int r854empty(T854* C){
  280. int R=0;
  281. R=(/*(IRF4.6count*/((((T854*)C))->_upper/*8*/)+(1)/*)*/)==(0);
  282. return R;
  283. }
  284. /*No:FIXED_ARRAY[PARENT].item*/
  285. /*No:FIXED_ARRAY[PARENT].clear*/
  286. /*No:FIXED_ARRAY[PARENT].storage*/
  287. /*No:FIXED_ARRAY[PARENT].capacity*/
  288. T0* r854last(T854* C){
  289. T0* R=NULL;
  290. R=/*(IRF4.6item*/((((T854*)C))->_storage/*0*/)[(((T854*)C))->_upper/*8*/]/*)*/;
  291. return R;
  292. }
  293. void r854with_capacity(T854* C,int a1){
  294. /*IF*/if (((((T854*)C))->_capacity/*4*/)<(a1)) {
  295. C->_storage=calloc(a1,sizeof(T0*));
  296. C->_capacity=a1;
  297. }
  298. /*FI*/C->_upper=-(1);
  299. }
  300. /*No:FIXED_ARRAY[PARENT].put*/
  301. /*No:FIXED_ARRAY[PARENT].upper*/
  302. void r854add_last(T854* C,T0* a1){
  303. int _new_capacity=0;
  304. /*IF*/if ((((((T854*)C))->_upper/*8*/)+(1))<=(((((T854*)C))->_capacity/*4*/)-(1))) {
  305. C->_upper=((((T854*)C))->_upper/*8*/)+(1);
  306. }
  307.  else if (((((T854*)C))->_capacity/*4*/)==(0)) {
  308. C->_storage=calloc(2,sizeof(T0*));
  309. C->_capacity=2;
  310. C->_upper=0;
  311. }
  312. else {
  313. _new_capacity=(2)*((((T854*)C))->_capacity/*4*/);
  314. C->_storage=r304realloc((((T854*)C))->_storage/*0*/,(((T854*)C))->_capacity/*4*/,_new_capacity);
  315. C->_capacity=_new_capacity;
  316. C->_upper=((((T854*)C))->_upper/*8*/)+(1);
  317. }
  318. /*FI*//*[IRF3.5put*/((((T854*)C))->_storage/*0*/)[(((T854*)C))->_upper/*8*/]=(a1);
  319. /*]*/
  320. }
  321. /*No:FIXED_ARRAY[PARENT].count*/
  322. void r854remove_last(T854* C){
  323. C->_upper=((((T854*)C))->_upper/*8*/)-(1);
  324. }
  325. T0* r26item(T26* C,int a1){
  326. T0* R=NULL;
  327. R=((((T26*)C))->_storage/*0*/)[(a1)-((((T26*)C))->_lower/*12*/)];
  328. return R;
  329. }
  330. /*No:ARRAY[PARENT].storage*/
  331. /*No:ARRAY[PARENT].capacity*/
  332. /*No:ARRAY[PARENT].lower*/
  333. /*No:ARRAY[PARENT].put*/
  334. /*No:ARRAY[PARENT].upper*/
  335. int r26count(T26* C){
  336. int R=0;
  337. R=(((((T26*)C))->_upper/*8*/)-((((T26*)C))->_lower/*12*/))+(1);
  338. return R;
  339. }
  340. void r26add_last(T26* C,T0* a1){
  341. int _new_capacity=0;
  342. /*IF*/if (((((T26*)C))->_capacity/*4*/)<((r26count(C))+(1))) {
  343. /*IF*/if (((((T26*)C))->_capacity/*4*/)==(0)) {
  344. C->_capacity=16;
  345. C->_storage=calloc((((T26*)C))->_capacity/*4*/,sizeof(T0*));
  346. }
  347. else {
  348. _new_capacity=(2)*((((T26*)C))->_capacity/*4*/);
  349. C->_storage=r304realloc((((T26*)C))->_storage/*0*/,(((T26*)C))->_capacity/*4*/,_new_capacity);
  350. C->_capacity=_new_capacity;
  351. }
  352. /*FI*/}
  353. /*FI*/C->_upper=((((T26*)C))->_upper/*8*/)+(1);
  354. /*[IRF3.6put*/{T26* C1=C;
  355. T0* b1=a1;
  356. int b2=(((T26*)C))->_upper/*8*/;
  357. ((((T26*)C1))->_storage/*0*/)[(b2)-((((T26*)C1))->_lower/*12*/)]=(b1);
  358. }/*]*/
  359. }
  360. T0* r26first(T26* C){
  361. T0* R=NULL;
  362. R=r26item(C,(((T26*)C))->_lower/*12*/);
  363. return R;
  364. }
  365. T0* r587item(T587* C,int a1){
  366. T0* R=NULL;
  367. R=((((T587*)C))->_storage/*0*/)[(a1)-((((T587*)C))->_lower/*12*/)];
  368. return R;
  369. }
  370. /*No:ARRAY[EXPORT_ITEM].storage*/
  371. /*No:ARRAY[EXPORT_ITEM].capacity*/
  372. /*No:ARRAY[EXPORT_ITEM].lower*/
  373. /*No:ARRAY[EXPORT_ITEM].put*/
  374. /*No:ARRAY[EXPORT_ITEM].upper*/
  375. int r587count(T587* C){
  376. int R=0;
  377. R=(((((T587*)C))->_upper/*8*/)-((((T587*)C))->_lower/*12*/))+(1);
  378. return R;
  379. }
  380. void r587add_last(T587* C,T0* a1){
  381. int _new_capacity=0;
  382. /*IF*/if (((((T587*)C))->_capacity/*4*/)<((r587count(C))+(1))) {
  383. /*IF*/if (((((T587*)C))->_capacity/*4*/)==(0)) {
  384. C->_capacity=16;
  385. C->_storage=calloc((((T587*)C))->_capacity/*4*/,sizeof(T0*));
  386. }
  387. else {
  388. _new_capacity=(2)*((((T587*)C))->_capacity/*4*/);
  389. C->_storage=r44realloc((((T587*)C))->_storage/*0*/,(((T587*)C))->_capacity/*4*/,_new_capacity);
  390. C->_capacity=_new_capacity;
  391. }
  392. /*FI*/}
  393. /*FI*/C->_upper=((((T587*)C))->_upper/*8*/)+(1);
  394. /*[IRF3.6put*/{T587* C1=C;
  395. T0* b1=a1;
  396. int b2=(((T587*)C))->_upper/*8*/;
  397. ((((T587*)C1))->_storage/*0*/)[(b2)-((((T587*)C1))->_lower/*12*/)]=(b1);
  398. }/*]*/
  399. }
  400. /*No:ARRAY[MANIFEST_STRING].clear_all*/
  401. /*No:ARRAY[MANIFEST_STRING].set_all_with*/
  402. void r381make(T381* C,int a1,int a2){
  403. int _needed=0;
  404. C->_lower=a1;
  405. C->_upper=a2;
  406. _needed=((a2)-(a1))+(1);
  407. /*IF*/if ((_needed)>(0)) {
  408. /*IF*/if (((((T381*)C))->_capacity/*8*/)<(_needed)) {
  409. /*IF*/if (((((T381*)C))->_capacity/*8*/)==(0)) {
  410. C->_storage=calloc(_needed,sizeof(T0*));
  411. }
  412. else {
  413. C->_storage=calloc(_needed,sizeof(T0*));
  414. }
  415. /*FI*/C->_capacity=_needed;
  416. }
  417. else {
  418. /*[IRF3.6clear_all*/{T381* C1=C;
  419. T0* __value=NULL;
  420. /*[IRF3.6set_all_with*/{T381* C2=C1;
  421. T0* c1=__value;
  422. r729set_all_with((((T381*)C2))->_storage/*4*/,c1,((((T381*)C2))->_upper/*12*/)-((((T381*)C2))->_lower/*16*/));
  423. }/*]*/
  424. }/*]*/
  425. }
  426. /*FI*/}
  427. /*FI*/}
  428. T0* r381item(T381* C,int a1){
  429. T0* R=NULL;
  430. R=((((T381*)C))->_storage/*4*/)[(a1)-((((T381*)C))->_lower/*16*/)];
  431. return R;
  432. }
  433. /*No:ARRAY[MANIFEST_STRING].storage*/
  434. T0* r381twin(T381* C){
  435. T0* R=NULL;
  436. R=malloc(sizeof(*C));
  437. *((T381*)R)=M381;
  438. r381copy(((T381*)R),((T0*)C));
  439. return R;
  440. }
  441. /*No:ARRAY[MANIFEST_STRING].capacity*/
  442. void r381copy(T381* C,T0* a1){
  443. int _needed_capacity=0;
  444. C->_lower=(((T381*)((T381*)a1)))->_lower/*16*/;
  445. C->_upper=(((T381*)((T381*)a1)))->_upper/*12*/;
  446. _needed_capacity=(((((T381*)C))->_upper/*12*/)-((((T381*)C))->_lower/*16*/))+(1);
  447. /*IF*/if (((((T381*)C))->_capacity/*8*/)<(_needed_capacity)) {
  448. C->_capacity=_needed_capacity;
  449. C->_storage=calloc((((T381*)C))->_capacity/*8*/,sizeof(T0*));
  450. }
  451. /*FI*//*IF*/if ((_needed_capacity)>(0)) {
  452. r729copy_from((((T381*)C))->_storage/*4*/,(((T381*)((T381*)a1)))->_storage/*4*/,(_needed_capacity)-(1));
  453. }
  454. /*FI*/}
  455. /*No:ARRAY[MANIFEST_STRING].lower*/
  456. /*No:ARRAY[MANIFEST_STRING].put*/
  457. /*No:ARRAY[MANIFEST_STRING].upper*/
  458. int r381count(T381* C){
  459. int R=0;
  460. R=(((((T381*)C))->_upper/*12*/)-((((T381*)C))->_lower/*16*/))+(1);
  461. return R;
  462. }
  463. void r381add_last(T381* C,T0* a1){
  464. int _new_capacity=0;
  465. /*IF*/if (((((T381*)C))->_capacity/*8*/)<((r381count(C))+(1))) {
  466. /*IF*/if (((((T381*)C))->_capacity/*8*/)==(0)) {
  467. C->_capacity=16;
  468. C->_storage=calloc((((T381*)C))->_capacity/*8*/,sizeof(T0*));
  469. }
  470. else {
  471. _new_capacity=(2)*((((T381*)C))->_capacity/*8*/);
  472. C->_storage=r729realloc((((T381*)C))->_storage/*4*/,(((T381*)C))->_capacity/*8*/,_new_capacity);
  473. C->_capacity=_new_capacity;
  474. }
  475. /*FI*/}
  476. /*FI*/C->_upper=((((T381*)C))->_upper/*12*/)+(1);
  477. /*[IRF3.6put*/{T381* C1=C;
  478. T0* b1=a1;
  479. int b2=(((T381*)C))->_upper/*12*/;
  480. ((((T381*)C1))->_storage/*4*/)[(b2)-((((T381*)C1))->_lower/*16*/)]=(b1);
  481. }/*]*/
  482. }
  483. T0* r381first(T381* C){
  484. T0* R=NULL;
  485. R=r381item(C,(((T381*)C))->_lower/*16*/);
  486. return R;
  487. }
  488. /*No:ARRAY[FEATURE_NAME].clear_all*/
  489. /*No:ARRAY[FEATURE_NAME].set_all_with*/
  490. void r855make(T855* C,int a1,int a2){
  491. int _needed=0;
  492. C->_lower=a1;
  493. C->_upper=a2;
  494. _needed=((a2)-(a1))+(1);
  495. /*IF*/if ((_needed)>(0)) {
  496. /*IF*/if (((((T855*)C))->_capacity/*4*/)<(_needed)) {
  497. /*IF*/if (((((T855*)C))->_capacity/*4*/)==(0)) {
  498. C->_storage=calloc(_needed,sizeof(T0*));
  499. }
  500. else {
  501. C->_storage=calloc(_needed,sizeof(T0*));
  502. }
  503. /*FI*/C->_capacity=_needed;
  504. }
  505. else {
  506. /*[IRF3.6clear_all*/{T855* C1=C;
  507. T0* __value=NULL;
  508. /*[IRF3.6set_all_with*/{T855* C2=C1;
  509. T0* c1=__value;
  510. r175set_all_with((((T855*)C2))->_storage/*0*/,c1,((((T855*)C2))->_upper/*8*/)-((((T855*)C2))->_lower/*12*/));
  511. }/*]*/
  512. }/*]*/
  513. }
  514. /*FI*/}
  515. /*FI*/}
  516. T0* r855item(T855* C,int a1){
  517. T0* R=NULL;
  518. R=((((T855*)C))->_storage/*0*/)[(a1)-((((T855*)C))->_lower/*12*/)];
  519. return R;
  520. }
  521. void r855clear(T855* C){
  522. C->_upper=((((T855*)C))->_lower/*12*/)-(1);
  523. }
  524. /*No:ARRAY[FEATURE_NAME].storage*/
  525. T0* r855twin(T855* C){
  526. T0* R=NULL;
  527. R=malloc(sizeof(*C));
  528. *((T855*)R)=M855;
  529. r855copy(((T855*)R),((T0*)C));
  530. return R;
  531. }
  532. /*No:ARRAY[FEATURE_NAME].capacity*/
  533. void r855copy(T855* C,T0* a1){
  534. int _needed_capacity=0;
  535. C->_lower=(((T855*)((T855*)a1)))->_lower/*12*/;
  536. C->_upper=(((T855*)((T855*)a1)))->_upper/*8*/;
  537. _needed_capacity=(((((T855*)C))->_upper/*8*/)-((((T855*)C))->_lower/*12*/))+(1);
  538. /*IF*/if (((((T855*)C))->_capacity/*4*/)<(_needed_capacity)) {
  539. C->_capacity=_needed_capacity;
  540. C->_storage=calloc((((T855*)C))->_capacity/*4*/,sizeof(T0*));
  541. }
  542. /*FI*//*IF*/if ((_needed_capacity)>(0)) {
  543. r175copy_from((((T855*)C))->_storage/*0*/,(((T855*)((T855*)a1)))->_storage/*0*/,(_needed_capacity)-(1));
  544. }
  545. /*FI*/}
  546. /*No:ARRAY[FEATURE_NAME].lower*/
  547. /*No:ARRAY[FEATURE_NAME].put*/
  548. /*No:ARRAY[FEATURE_NAME].upper*/
  549. int r855count(T855* C){
  550. int R=0;
  551. R=(((((T855*)C))->_upper/*8*/)-((((T855*)C))->_lower/*12*/))+(1);
  552. return R;
  553. }
  554. void r855add_last(T855* C,T0* a1){
  555. int _new_capacity=0;
  556. /*IF*/if (((((T855*)C))->_capacity/*4*/)<((r855count(C))+(1))) {
  557. /*IF*/if (((((T855*)C))->_capacity/*4*/)==(0)) {
  558. C->_capacity=16;
  559. C->_storage=calloc((((T855*)C))->_capacity/*4*/,sizeof(T0*));
  560. }
  561. else {
  562. _new_capacity=(2)*((((T855*)C))->_capacity/*4*/);
  563. C->_storage=r175realloc((((T855*)C))->_storage/*0*/,(((T855*)C))->_capacity/*4*/,_new_capacity);
  564. C->_capacity=_new_capacity;
  565. }
  566. /*FI*/}
  567. /*FI*/C->_upper=((((T855*)C))->_upper/*8*/)+(1);
  568. /*[IRF3.6put*/{T855* C1=C;
  569. T0* b1=a1;
  570. int b2=(((T855*)C))->_upper/*8*/;
  571. ((((T855*)C1))->_storage/*0*/)[(b2)-((((T855*)C1))->_lower/*12*/)]=(b1);
  572. }/*]*/
  573. }
  574. T0* r855first(T855* C){
  575. T0* R=NULL;
  576. R=r855item(C,(((T855*)C))->_lower/*12*/);
  577. return R;
  578. }
  579.  
  580.